Calculating a Relation Indicator for a Relation Between Entities

ABSTRACT

A method is provided for calculating a relation indicator for a relation between entities based on an optimization procedure. The method combines the strong relational learning ability and the good scalability of the RESCAL model with the linear regression model, which may deal with observed patterns to model known relations. The method may be used to determine relations between objects, for instance entries in a database, such as a shopping platform, medical treatments, production processes, or in the context of the Internet of Things, in a fast and precise manner.

TECHNICAL FIELD

The embodiments relate to a method for calculating a relation indicatorfor a relation between entities.

BACKGROUND

Relational and graph-structured data has become ubiquitous in manyfields of application such as social network analysis, bioinformatics,artificial intelligence, or factory processing. Therefore, learning fromlarge-scale relational data is an increasingly important field.

As a consequence of increasing volume and complexity of data,scalability and modeling power become crucial for learning machinealgorithms dealing with the large-scale relational data. Approachesinvolve for instance logical representations of the model (e.g.,Inductive Logic Programming or Markov Logic Networks) or include a setof latent variables (e.g., the Infinite Hidden Relational Model or theInfinite Relational Model).

Latent variable models allow deducing unknown relationships hidden inthe data. An important approach is tensor factorization, which is ageneralization of matrix factorization to higher-order data. In the pastyears, tensor factorization methods have become popular for learningfrom multi-relational data.

SUMMARY AND DESCRIPTION

The scope of the present invention is defined solely by the appendedclaims and is not affected to any degree by the statements within thissummary. The present embodiments may obviate one or more of thedrawbacks or limitations in the related art.

According to a first aspect, a method for calculating a relationindicator for a relation between entities includes the acts of: (1)providing a measurement tensor X of measurement tensor components,X_(ijk), with i, j=1 . . . N, including measurement data as relationindicators, wherein the relation indicator X_(ijk) indicates the k-threlation between an i-th and a j-th of a number, N, of entities; (2)providing a rules tensor M of rules tensor components, Mijn, describinga prediction of an n-th rule; (3) calculating a weighting tensor ofweighting tensor components, Wnk, indicating relative weights of therules for the k-th relation between the entities; (4) calculating arelationship tensor R of relationship tensor components, Rabk, with a,b=1 . . . r, indicating relations between a set of a number, r, ofproperties of the entities; (5) calculating a transformation tensor A oftransformation tensor components, Aia, describing the i-th entity via rlatent properties, where the transformation tensor A, the weightingtensor W, and the relationship tensor R are calculated as the minimumsolutions to the equation:

${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$

with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:

X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)),

where A^(T) is the transposed tensor corresponding to the transformationtensor A; and (6) calculating a value of the relation indicator for thek-th relation between the i-th and the j-th entity based on the resulttensor component X_(ijk) ^(′).

In an embodiment, the method further includes the act of generating atleast one control signal, based on the predicted value of the relationindicator, for controlling an actuator, a sensor, a controller, a fielddevice, and/or a display.

In an embodiment, a visual and/or acoustic signal is created based onthe control signal.

In an embodiment, the method further includes: expanding the measurementtensor with additional measurement tensor components X_(i(N+1)k) for i=1. . . N, X_((N+1)jk) for j=1 . . . N and X_((N+1)(N+1)k), includingmeasurement data as relation indicators between the (N+1)-th additionalentity and the entities; and expanding the rules tensor with additionalrules tensor components, M_(i(N+)n) for i=1 . . . N, M_((N+1)jn) for j=1. . . N and M_((N+1)(N+1)n); wherein a value of a relation indicator tobe predicted is set to a predetermined value.

In an embodiment, the method further includes: monitoring a relationbetween at least two of the entities; and setting a value of at leastone relation indicator based on the monitored relation between the atleast two of the entities.

In an embodiment, at least some of the measurement data are provided byat least one sensor and/or are read out from at least one database.

In an embodiment, for calculating the result tensor an alternatingleast-squares method is used, wherein the transformation tensor, therelationship tensor and the weighting tensor are updated alternatinglyuntil convergence.

According to a further aspect, a computer program for calculating arelation indicator for a relation between entities includes programinstructions configured to, when executed: (1) provide a measurementtensor X of measurement tensor components, X_(ijk), with i, j=1 . . . N,including measurement data as relation indicators, wherein the relationindicator X_(ijk) indicates a k-th relation between an i-th and a j-thof a number, N, of entities; (2) provide a rules tensor M of rulestensor components, M_(ijn), describing a prediction of an n-th rule; (3)calculate a weighting tensor W of weighting tensor components, W_(nk),indicating relative weights of the rules for the k-th relation betweenthe entities; (4) calculate a relationship tensor R of relationshiptensor components, R_(abk), with a, b=1 . . . r, indicating relationsbetween a set of a number, r, of properties of the entities; (5)calculate a transformation tensor A of transformation tensor components,A_(ia), describing the i-th entity via r latent properties, wherein thetransformation tensor A, the weighting tensor W, and the relationshiptensor R are calculated as the minimum solutions to the followingequation:

${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$

with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:

X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)),

where A^(T) is the transposed tensor corresponding to the transformationtensor A; and (6) calculate a value of the relation indicator for thek-th relation between the i-th and the j-th entity based on the resulttensor component X_(ijk) ^(′).

According to a further aspect, a computer-readable, non-transitorystorage medium includes stored program instructions configured to, whenexecuted: (1) provide a measurement tensor X of measurement tensorcomponents, X_(ijk), with i, j=1 . . . N, including measurement data asrelation indicators, wherein the relation indicator X_(ijk) indicates ak-th relation between an i-th and a j-th of a number, N, of entities;(2) provide a rules tensor M of rules tensor components, M_(ijn),describing the predictions of the n-th rule; (3) calculate a weightingtensor W of weighting tensor components, W_(nk), indicating relativeweights of the rules for the k-th relation between the entities; (4)calculate a relationship tensor R of relationship tensor components,R_(abk), with a, b=1 . . . r, indicating relations between a set of anumber, r, of properties of the entities; (5) calculate a transformationtensor A of transformation tensor components, A_(ia), describing thei-th entity via r latent properties, wherein the transformation tensorA, the weighting tensor W, and the relationship tensor R are calculatedas the minimum solutions to the following equation:

${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$

with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:

X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)),

where A^(T) is the transposed tensor corresponding to the transformationtensor A; and (6) calculate a value of the relation indicator for thek-th relation between the i-th and the j-th entity based on the resulttensor component X_(ijk) ^(′).

According to a further aspect, an apparatus for calculating a relationindicator for a relation between entities includes: (1) a measurementtensor module configured to provide a measurement tensor X ofmeasurement tensor components, X_(ijk), with i, j=1 . . . N, includingmeasurement data as relation indicators, wherein the relation indicatorX_(ijk) indicates a k-th relation between an i-th and a j-th of anumber, N, of entities; (2) a rules tensor module M configured toprovide a rules tensor of rules tensor components, M_(ijn), describingthe predictions of the n-th rule; (3) a weighting tensor moduleconfigured to calculate a weighting tensor W of weighting tensorcomponents, W_(nk), indicating relative weights of the rules for thek-th relation between the entities; (4) a relationship tensor moduleconfigured to provide a relationship tensor R of relationship tensorcomponents, R_(abk), with a, b=1 . . . r, indicating relations between aset of a number, r, of properties of the entities; (5) a transformationtensor module configured to calculate a transformation tensor A oftransformation tensor components, A_(ia), describing the i-th entity viar latent properties, wherein the transformation tensor A, the weightingtensor W, and the relationship tensor R are calculated as the minimumsolutions to the following equation:

${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$

with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:

X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)),

where A^(T) is the transposed tensor corresponding to the transformationtensor A; (6) a result tensor calculation module configured to calculatethe result tensor X′ of the result tensor components X_(ijk) ^(′); and(7) a relation indicator calculation module configured to calculate avalue of the relation indicator for the k-th relation between the i-thand the j-th entity based on the result tensor component X_(ijk) ^(′).

In a possible embodiment, the apparatus further includes a controlsignal generation module configured to generate at least one controlsignal, based on the predicted value of the relation indicator, forcontrolling an actuator, a sensor, a controller, a field device, and/ora display.

In further embodiment, the apparatus further includes an output moduleconfigured to create a visual and/or acoustic signal based on thecontrol signal.

In further embodiment, the apparatus further includes: a measurementtensor expansion module configured to: (a) expand the measurement tensorwith additional measurement tensor components X_(i(N+1)k) for i=1 . . .N, X_((N+1)jk) for j=1 . . . N and X_((N+1)(N+1)k), includingmeasurement data as relation indicators between the (N+1)-th additionalentity and the entities, and (b) set a value of a relation indicator tobe predicted to a predetermined value; and a rules tensor expansionmodule configured to expand the rules tensor with additional rulestensor components, M_(i(N+1)n) for i=1 . . . N, M_((N+1)jn) for j=1 . .. N and M_((N+1)(N+1)n).

In another embodiment, the apparatus further includes: a monitoringmodule configured to monitor a relation between at least two of theentities; and a setting module configured to set a value of at least onerelation indicator based on the monitored relation between the at leasttwo of the entities.

In another embodiment, the apparatus further includes a measurementmodule configured to provide at least some of the measurement data tothe measurement tensor module.

In another embodiment, the apparatus further includes: at least onedatabase; and a readout module configured to read out at least some ofthe measurement data from the at least one database.

In another embodiment of the apparatus, the result tensor calculationmodule is configured to use an alternating least-squares method, whereinthe transformation tensor, the relationship tensor and the weightingtensor are updated alternatingly until convergence.

According to a further aspect, a system for calculating a relationindicator for a relation between entities includes: (1) a number, N, ofentities; (2) a measurement tensor module configured to provide ameasurement tensor X of measurement tensor components, X_(ijk), with i,j=1 . . . N, including measurement data as relation indicators, whereinthe relation indicator X_(ijk) indicates a k-th relation between an i-thand a j-th of the number of entities; (3) a rules tensor moduleconfigured to provide a rules tensor M of rules tensor components,M_(ijn), describing a prediction of an n-th rule; (4) a weighting tensormodule configured to calculate a weighting tensor W of weighting tensorcomponents, W_(nk), indicating relative weights of the rules for thek-th relation between the entities; (5) a relationship tensor moduleconfigured to calculate a relationship tensor R of relationship tensorcomponents, R_(abk), with a, b=1 . . . r, indicating relations between aset of a number, r, of properties of the entities; (6) a transformationtensor module configured to calculate a transformation tensor A oftransformation tensor components, A_(ia), describing the i-th entity viar latent properties, wherein the transformation tensor A, the weightingtensor W, and the relationship tensor R are calculated as the minimumsolutions to the following equation:

${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$

with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with X_(ijk)^(′) given by

X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)),

where A^(T) is the transposed tensor corresponding to the transformationtensor A; (7) a result tensor calculation module configured to calculatethe result tensor X′ of the result tensor components X_(ijk) ^(′); and(8) a relation indicator calculation module configured to calculate avalue of the relation indicator for a k-th relation between an i-th anda j-th entity based on the result tensor component X_(ijk) ^(′).

In another embodiment of the system, at least one of the entities is asensor, an actuator, a field device, a controller, a display, and/or asection of a conveyer belt assembly.

In another embodiment of the system, the system includes a controlsignal generation module configured to generate at least one controlsignal, based on the predicted value of the relation indicator, forcontrolling at least one of the entities of the system.

The number of latent variables in tensor factorization is determined viathe number of latent components used in the factorization, which in turnis bounded by the factorization rank. While tensor and matrixfactorization algorithms may scale well with the size of the data, whichis one reason for their appeal, the algorithms may not scale well withrespect to the rank of the factorization. Hence, the tensor rank is acentral parameter of factorization methods that determinesgeneralization ability as well as scalability.

A possible method has been proposed in document M. Nickel, X. Jiang, andV. Tresp, “Reducing the Rank in Relational Factorization Models byIncluding Observable Patterns,” in Advances in Neural InformationProcessing Systems 27, Curran Associates, Inc., 2014, pp. 1179-1187.

In a possible embodiment, use is made of a tensor model, called ARE(Additive Relational Effects), proposed in the paper above, which isherein incorporated by reference. The ARE model combines the strongrelational learning ability and the good scalability of the RESCAL modelwith the linear regression model, which may deal with observed patternsto model known relations. It has been shown in the paper cited abovethat the method used in the embodiments of is substantially faster ascompared to state of the art methods, in particular over pure latentvariable methods. The proposed method used in the embodiments reducesthe required rank of the tensor significantly.

Therefore, an advantage of the present embodiments is that runtime andmemory complexity is significantly reduced.

Another advantage of the method is that as it works fast, it is possibleto react faster to certain events according to the predictions of themethod.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1 to 3 depict flow charts of exemplary methods for calculating arelation indicator for relations between entities.

FIG. 4 depicts an exemplary processing module.

FIG. 5 depicts an exemplary apparatus for calculating a relationindicator for a relation between entities.

DETAILED DESCRIPTION

The following terms shall have, for the purposes of this application,the respective meanings set forth below.

A “tensor” is an array of values having two or more dimensions. Atwo-dimensional tensor A has components A_(ij), a three-dimensionaltensor R has components R_(ijk), and so on.

A “factorization model” is a mathematical model used to cluster items.

A “transposed tensor” A^(T) corresponding to a two-dimensional tensor Awith components A_(ij) is the two-dimensional tensor with componentsA_(ij) ^(T)=A_(ji).

The value ∥A∥_(F) ²=Σ_(ij) A_(ij) ² is the “Frobenius norm” of thetwo-dimensional tensor A, and the value ∥R∥²=Σ_(ijk) R_(ijk) ² is the“Frobenius norm” of the three-dimensional tensor R.

Referring now to FIG. 1, an exemplary method for calculating a relationindicator for a relation between entities is depicted. The method dealswith a number N of entities, where the integer N is not restricted. Inparticular, N may be a large number.

In act S101, a measurement tensor X is provided, where the measurementtensor has measurement tensor components, X_(ijk), with i, j=1 . . . Nand k=1 . . . K. The measurement tensor components, X_(ijk), are realvalues. The measurement data includes data as relation indicators,wherein the relation indicator X_(ijk) indicates a k-th relation betweenthe i-th and the j-th entities out of the N entities.

The measurement tensor components, X_(ijk), may be provided, at leastpartially, by a sensor, (e.g., an optical sensor), which is able toperform measurements on the entities. The measurement tensor components,X_(ijk), may also be provided, at least partially, on at least onedatabase or they may be obtained via an interface or over a network suchas the internet.

The size of the value of the relation indicator X_(ijk) corresponds tothe strength of the k-th relation between the i-th and the j-th entity.For instance a correlation value corresponding to the k-th relationbetween the i-th and j-th value may be used as relation indicatorX_(ijk).

In act S102, a rules tensor M is provided having rules tensor componentsM_(ijn), with i, j=1 . . . N and n=1 . . . P for a given integer P,which is the total number of rules. The rules tensor components M_(ijn)may include deterministic dependencies between the i-th and j-th entityor confidences values or probabilities that a relationship existsbetween the i-th and j-th entity corresponding to the n-th rule. Therule tensor components may involve link prediction heuristics such asCommon Neighbors, Katz Centrality, or Horn clauses.

In act S103, a weighting tensor W of weighting tensor components, W_(nk)is calculated, with n=1 . . . P and k=1 . . . K. The weighting tensorcomponents W_(nk) correspond to the relative weight of the n-th rule forthe k-th relation between the entities. For instance, it may indicatehow much the n-th rule correlates with the k-th relation. In addition, arelationship tensor R is calculated with relationship tensor components,R_(abk), with a, b=1 . . . r and k=1 . . . K, where the integer r is thenumber of a given set of properties of the entities. The relationshiptensor component R_(abk) indicates the k-th relation between the a-thand the b-th property. Further, a transformation tensor A is calculatedwith transformation tensor components, A_(ia), with i=1 . . . N and a=1. . . r, which describe the i-th entity via r latent properties.

Herein, the transformation tensor A, the weighting tensor W, and therelationship tensor R are calculated as the minimum solutions to thefollowing equation:

${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$

where λ_(A), λ_(R), and λ_(W) are Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:

X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)),

where A^(T) is the transposed tensor corresponding to the transformationtensor A. The first term of X_(ijk) ^(′) in the above formula may beconsidered as a RESCAL procedure, which is a state-of-the-art relationallearning method that is based on a constrained Tucker decomposition. Thesecond term of X_(ijk) ^(′) in the above formula corresponds to a linearregression model.

Solving an optimization problem with Lagrange parameters (also calledLagrange multipliers) may be done, for instance, via alternatingleast-squares, which is a block-coordinate optimization method in whichthe transformation tensor A, the relation tensor R, and the weightingtensor W are updated alternatingly until convergence. In particular, theinitial value for the transformation tensor A, the weighting tensor W,and the relationship tensor R may be chosen according to the problem.For instance, the initial values for the components of thetransformation tensor A, the weighting tensor W, and the relationshiptensor R may be chosen to be random numbers.

In act S104, a result tensor X′ with result tensor components, X_(ijk)^(′), with i, j=1 . . . N and k=1 . . . K is computed by inserting thesolutions for the transformation tensor A, the weighting tensor W, andthe relationship tensor R as calculated in act S103 into the aboveformula for the result tensor X′.

In act S105, a value of the relation indicator for the k-th relationbetween the i-th and the j-th entity is computed, based on the resulttensor component X_(ijk) ^(′). For instance, the strength of the k-threlation between the i-th and the j-th entity may be equal to the resulttensor component X_(ijk) ^(′).

According to a further embodiment, the method for calculating a relationindicator for a relation between entities includes an additional actS106, as depicted in FIG. 2, of generating at least one control signal,based on the predicted value of the relation indicator. For instance,the result tensor component X′ may be taken as an input for generating acontrol signal, for controlling an actuator, a sensor, a controller, afield device and/or a display. In particular, a visual signal and/or anacoustic signal may be created. For instance, the computed result tensorX′ or selected elements of the result tensor component X_(ijk) ^(′) maybe prompted on a screen.

According to a further embodiment, as depicted in FIG. 3, the processinvolves after act S105 an additional act S107 of obtaining data. Thedata may contain new values for the relations between the entities. Forexample, at least one relation between at least two of the entities maybe monitored.

After act S107, the method may jump back to act S101, where thecorresponding measurement tensor components of the measurement tensor Xmay be replaced by new measurement tensor components based on the dataobtained in act S107.

According to a further embodiment, the data obtained in act S107 maycorrespond to a new entity and may in particular involve relationsbetween the new entity and the entities already present in the method(the old entities). After act S107, the method starts again with actS101. Now, the measurement tensor X includes measurement tensorcomponents, X_(ijk), with i, j=1 . . . N+1, where the measurement tensorcomponents X_(ijk), with i, j=1 . . . N are equal to the result tensorcomponent X_(ijk) ^(′) computed in act S106. For each k=1 . . . k, theadditional measurement tensor components X_((N+1)jk), with j=1 . . . N+1and N_(i(N+1)k), with i=1 . . . N are determined based on the dataobtained in act S108. If no data was obtained for certain measurementtensor components, the respective measurement tensor components may beset to a predetermined value, for instance 0.

Likewise in act S102, the rules tensor M has rules tensor components,M_(ijn), with i, j=1 . . . N+1, where the rules tensor componentsM_(ijn), with i, j=1 . . . N are equal to old rules tensor componentM_(ijn), from the previous act S102, while the additional rules tensorcomponents M_((N+1)jn), with j=1 . . . N+1 and M_(i(N+1)n), with i=1 . .. N are determined based on the data obtained in act S107. If no datawas obtained for certain measurement tensor components, the respectivemeasurement tensor components may be set to a predetermined value, forinstance 0.

The following acts are performed with the respective dimensions of thetensors adjusted. In particular, in act S106, a result tensor X′ withresult tensor components X_(ijk) ^(′) for i, j=1 . . . N+1 is computed.

The method according may be implemented in hardware, firmware, software,or a combination of the three. The method may be implemented in acomputer program executed on a programmable computer having a processor,a data storage system, volatile and non-volatile memory, and/or storageelements, at least one input device and at least one output device.

Each such computer program may be stored on a storage media or device(e.g., hard disk drive, floppy disk drive, read only memory (ROM),external or internal CD-ROM device, flash memory device, a USB drive,digital versatile disk (DVD), or other storage device) readable by ageneral or special purpose programmable computer system, for configuringand operating the computer system when the storage media or device isread by the computer system to perform the procedures described herein.Embodiments may also be considered to be implemented as amachine-readable storage medium, configured for use with a computersystem, where the storage medium so configured causes the computersystem to operate in a specific and predefined manner to perform thefunctions described herein.

FIG. 4 depicts a processing module 10. The processing module 10 containsa module for obtaining data 11, which might in particular includesensors or interfaces to other modules or to a network such as theinternet. The processing module 10 further includes an apparatus 12,which is designed to perform the method as described above.

In more detail, as depicted in FIG. 5, the apparatus 12 includes ameasurement tensor module 121 configured to provide a measurement tensorX, a rules tensor module 122 configured to provide a rules tensor M, aweighting tensor module 123 configured to calculated a weighting tensorW, a relationship tensor module 124 configured to calculate arelationship tensor R, a transformation tensor module 125 configured toprovide a transformation tensor A, a result tensor calculation module126 configured to calculate a result tensor X′, and a relation indicatorcalculation module 127 configured to calculate a value of the relationindicator for the k-th relation between the i-th and the j-th entity.

The measurement tensor X, the rules tensor M, the weighting tensor W,and the relationship tensor R may all at least partially be based on theinput from the module for obtaining data 11, but the embodiments are notlimited to this case.

The processing module 10 further includes an output module 13, whichgenerates an output based on the relation indicator that has beencalculated by the apparatus 12. The output module may include aninterface, such as a screen, or an acoustic or visual signal generator.

The apparatus is not limited to the described processing module 10. Inparticular, the apparatus 12 may exist as a unit by itself.

As a first example, a method to study buying behavior in an onlineshopping platform is discussed. The entities involve all or a selectionof costumers that are registered at the shopping platforms, and all or aselection of products that may be purchased on the shopping platform.

The measurement tensor X contains a set of K relations between theentities (e.g., costumers and products). As an example, the k-threlation may be how often a costumer has already purchased a certainproduct. The measurement tensor components X_(ijk) is equal to thenumber of times the product has been purchased for a costumer i and aproduct j and is set to zero, when both i and j refer to costumers orboth i and j refer to products. As another example, the value of themeasurement tensor components X_(ijk) for costumers i and j may includehow closely the costumers i and j are linked, for instance on a socialplatform (with X_(ijk) set to zero for i and/or j referring to aproduct). Further examples for relations may be how often the costumerhas already searched for the particular product, or how often particularproducts are purchased together.

An example for a rule appearing in a rules tensor may be that a travelguide for a certain country is likely purchased together with a travelto that country, thus assigning a high value to the corresponding rulestensor component.

Often, a certain entry, say X_(ijk), of the measurement tensor X is notknown and will be set to zero in a first approximation. With the methoddescribed above, it is possible to compute the result tensor X′, whosecomponents are now to be considered to be better approximations to thereal situation. Therefore the result tensor component X_(ijk) ^(′) isused as a prediction for the value of the k-th relation between the i-thand the j-th product. For instance, it is possible to make a prediction,how likely a certain costumer will purchase a certain product.

The method may be used for medical treatment. In this case, the entitiesinclude a set of patients, a set of treatments, and a set of diseases. Ak-th relation may be how many units of a certain treatment a certainpatient gets per day, so if i refers to a patient and j to a treatment,X_(ijk) is set equal to the number of units of treatment j, which apatient i gets per day. If j refers to a patient and i to a treatment,X_(ijk) is also set equal to the number of units of treatment i, which apatient j gets per day. All other entries X_(ijk) for i and j not beinga patient and a treatment are set to zero. Another relation may involvea quantification of the kinship between the patients.

A rule may involve the correlation between diseases and medication, forinstance, based on empirical data.

If now the number of units of a certain treatment j a patient i gets perday is to be determined, the corresponding value of the measurementtensor X, say X_(ijk), will be set to zero in a first approximation.With the method described above, the result tensor X′ is computed andthe respective result tensor component X_(ijk) ^(′) is used as aprediction for how many units of the treatment j the patient i may get.

For example, the method may also involve a production process in afactory. The entities include a set of units, such as robots, machines,sensors, controlling units, and the like. A possible relation may be howlikely certain units are activated together. Another possible relationis how likely it is that a malfunction of two given units shows up atthe same time. If this relation is unknown for two certain units, it maybe set to a predetermined value, for instance 0. Once the correspondingcomponent X_(ijk) ^(′) of the result tensor is computed, the relationbetween said two units may be predicted. If the value X_(ijk) ^(′) ishigh, it is likely that after a malfunction in a first of the two saidunits has occurred, also a malfunction of the second unit will occur.Given that it has been detected that a malfunction of one of the twosaid units has occurred, a warning signal may be given to a user.Alternatively, an automatic replacement may be initiated, for instanceby a control unit.

The embodiments are not limited to these examples. In particular, themethod may be used to control devices in a car or in the context ofInternet of things (IoT) technologies.

As another use case of the method, a manufacturing method with a set ofconveyor bands may be used. In this case, the entities are the differentconveyor bands. An example of a relation may be how often a malfunctionof a certain conveyor band appears together with a malfunction ofanother conveyor band. Another example may be how often a certainconveyor band is activated, once another conveyor band is activated. Arule may be that a first conveyor band is deactivated, once a secondconveyor band is deactivated (for instance, because the first conveyorband is located directly behind the second conveyor band). If therelation of how often a first conveyor band malfunctions if a secondconveyor band malfunctions is unknown, its corresponding value in themeasurement tensor may be set to zero. The result tensor is computedwith the method and the predicted relation may be obtained from therespective component of the result tensor. If the second conveyor bandmalfunctions, a signal may be given based on the computed relation. Forinstance, a warning light may be turned on or a message may be promptedto a user.

This disclosure is not limited to the particular systems, devices andmethods described, as these may vary. The terminology used in thedescription is for the purpose of describing the particular versions orembodiments only, and is not intended to limit the scope.

As used in this document, the singular forms “a,” “an,” and “the”include plural references unless the context clearly dictates otherwise.Unless defined otherwise, all technical and scientific terms used hereinhave the same meanings as commonly understood by one of ordinary skillin the art. Nothing in this disclosure is to be construed as anadmission that the embodiments described in this disclosure are notentitled to antedate such disclosure by virtue of prior invention. Asused in this document, the term “comprising” refers to “including, butnot limited to.”

In the foregoing specification the invention has been described withreference to specific exemplary embodiments thereof. It will, however,be evident that various modification and changes may be made theretowithout departure from the broader spirit and scope of the invention asset forth in the appended claims. The specification and drawings are,accordingly, to be regarded in an illustrative rather than restrictivesense.

It is to be understood that the elements and features recited in theappended claims may be combined in different ways to produce new claimsthat likewise fall within the scope of the present invention. Thus,whereas the dependent claims appended below depend from only a singleindependent or dependent claim, it is to be understood that thesedependent claims may, alternatively, be made to depend in thealternative from any preceding or following claim, whether independentor dependent, and that such new combinations are to be understood asforming a part of the present specification.

1. A method for calculating a relation indicator for a relation betweenentities, the method comprising: providing a measurement tensor X ofmeasurement tensor components, X_(ijk), with i, j=1 . . . N, comprisingmeasurement data as relation indicators, wherein the relation indicatorX_(ijk) indicates a k-th relation between an i-th and a j-th of anumber, N, of entities; providing a rules tensor M of rules tensorcomponents, M_(ijn), describing a prediction of an n-th rule;calculating a weighting tensor of weighting tensor components, W_(nk),indicating relative weights of the rules for the k-th relation betweenthe entities; calculating a relationship tensor R of relationship tensorcomponents, R_(abk), with a, b=1 . . . r, indicating relations between aset of a number, r, of properties of the entities; calculating atransformation tensor A of transformation tensor components, A_(ia),describing the i-th entity via r latent properties, wherein thetransformation tensor A, the weighting tensor W, and the relationshiptensor R are calculated as minimum solutions to the following equation:${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)), where A^(T) is the transposed tensor corresponding to thetransformation tensor A; and calculating a value of the relationindicator for the k-th relation between the i-th and the j-th entitybased on the result tensor component X_(ijk) ^(′).
 2. The method ofclaim 1, further comprising: generating at least one control signal,based on the predicted value of the relation indicator, for controllingone or more of an actuator, a sensor, a controller, a field device, or adisplay.
 3. The method of claim 2, wherein a visual signal, an acousticsignal, or the visual and the acoustic signal are created based on thecontrol signal.
 4. The method of claim 1, further comprising: expandingthe measurement tensor with additional measurement tensor componentsX_(i(N+1)k) for i=1 . . . N, X_((N+1)jk) for j=1 . . . N, andX_((N+1)(N+1)k), comprising measurement data as relation indicatorsbetween the (N+1)-th additional entity and the entities; and expandingthe rules tensor with additional rules tensor components, M_(i(N+1)n)for i=1 . . . N, M_((N+1)jn) for j=1 . . . N and M_((N+1)(N+1)n),wherein a value of a relation indicator to be predicted is set to apredetermined value.
 5. The method of claim 1, further comprising:monitoring a relation between at least two of the entities; and settinga value of at least one relation indicator based on the monitoredrelation between the at least two of the entities.
 6. The method ofclaim 1, wherein at least some of the measurement data are provided byat least one sensor, are read out from at least one database, or areboth provided by the at least one sensor and read out from the at leastone database.
 7. The method of claim 1, wherein the calculating of theresult tensor comprises using an alternating least-squares method,wherein the transformation tensor, the relationship tensor, and theweighting tensor are updated alternatingly until convergence.
 8. Acomputer program for calculating a relation indicator for a relationbetween entities, comprising program instructions configured to, whenexecuted: provide a measurement tensor X of measurement tensorcomponents, X_(ijk), with i, j=1 . . . N, comprising measurement data asrelation indicators, wherein the relation indicator X_(ijk) indicates ak-th relation between an i-th and a j-th of a number, N, of entities;provide a rules tensor M of rules tensor components, M_(ijn), describinga prediction of an n-th rule; calculate a weighting tensor W ofweighting tensor components, W_(nk), indicating relative weights of therules for the k-th relation between the entities; calculate arelationship tensor R of relationship tensor components, R_(abk), witha, b=1 . . . r, indicating relations between a set of a number, r, ofproperties of the entities; calculate a transformation tensor A oftransformation tensor components, A_(ia), describing the i-th entity viar latent properties, wherein the transformation tensor A, the weightingtensor W, and the relationship tensor R are calculated as minimumsolutions to the following equation:${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given byX _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)), where A^(T) is the transposed tensor corresponding to thetransformation tensor A; and calculate a value of the relation indicatorfor the k-th relation between the i-th and the j-th entity based on theresult tensor component X_(ijk) ^(′).
 9. A computer-readable,non-transitory storage medium comprising stored program instructionsconfigured to, when executed: provide a measurement tensor X ofmeasurement tensor components, X_(ijk), with i, j=1 . . . N, comprisingmeasurement data as relation indicators, wherein the relation indicatorX_(ijk) indicates a k-th relation between an i-th and a j-th of anumber, N, of entities; provide a rules tensor M of rules tensorcomponents, M_(ijn), describing a prediction of an n-th rule; calculatea weighting tensor W of weighting tensor components, W_(nk), indicatingrelative weights of the rules for the k-th relation between theentities; calculate a relationship tensor R of relationship tensorcomponents, R_(abk), with a, b=1 . . . r, indicating relations between aset of a number, r, of properties of the entities; calculate atransformation tensor A of transformation tensor components, A_(ia),describing the i-th entity via r latent properties, wherein thetransformation tensor A, the weighting tensor W, and the relationshiptensor R are calculated as minimum solutions to the following equation:${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)), where A^(T) is the transposed tensor corresponding to thetransformation tensor A; and calculate a value of the relation indicatorfor the k-th relation between the i-th and the j-th entity based on theresult tensor component X_(ijk) ^(′).
 10. An apparatus for calculating arelation indicator for a relation between entities, comprising: ameasurement tensor module configured to provide a measurement tensor Xof measurement tensor components, X_(ijk), with i, j=1 . . . N,comprising measurement data as relation indicators, wherein the relationindicator X_(ijk) indicates a k-th relation between an i-th and a j-thof a number, N, of entities; a rules tensor module M configured toprovide a rules tensor of rules tensor components, M_(ijn), describing aprediction of an n-th rule; a weighting tensor module configured tocalculate a weighting tensor W of weighting tensor components, W_(nk),indicating relative weights of the rules for the k-th relation betweenthe entities; a relationship tensor module configured to calculate arelationship tensor R of relationship tensor components, R_(abk), witha, b=1 . . . r, indicating relations between a set of a number, r, ofproperties of the entities; a transformation tensor module configured tocalculate a transformation tensor A of transformation tensor components,A_(ia), describing the i-th entity via r latent variables, wherein thetransformation tensor A, the weighting tensor W, and the relationshiptensor R are calculated as minimum solutions to the following equation:${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)), where A^(T) is the transposed tensor corresponding to thetransformation tensor A; a result tensor calculation module configuredto calculate a result tensor X′ of result tensor components, X_(ijk)^(′); and a relation indicator calculation module configured tocalculate a value of the relation indicator for the k-th relationbetween the i-th and the j-th entity based on the result tensorcomponent X_(ijk) ^(′).
 11. The apparatus of claim 10, furthercomprising: a control signal generation module configured to generate atleast one control signal, based on the predicted value of the relationindicator, for controlling one or more of an actuator, a sensor, acontroller, a field device, or a display.
 12. The apparatus of claim 11,further comprising: an output module configured to create a visualsignal, an acoustic signal, or the visual signal and the acoustic signalbased on the control signal.
 13. The apparatus of claim 10, furthercomprising: a measurement tensor expansion module configured to: (1)expand the measurement tensor with additional measurement tensorcomponents X_(i(N+1)k) for i=1 . . . N, X_((N+1)jk) for j=1 . . . N andX_((N+1)(N+1)k), comprising measurement data as relation indicatorsbetween the (N+1)-th additional entity and the entities, and (2) set avalue of a relation indicator to be predicted to a predetermined value;and a rules tensor expansion module configured to expand the rulestensor with additional rules tensor components, M_(i(N+1)n) for i=1 . .. N, M_((N+1)jn) for j=1 . . . N and M_((N+1)(N+1)n).
 14. The apparatusof claim 10, further comprising: a monitoring module configured tomonitor a relation between at least two of the entities; and a settingmodule configured to set a value of at least one relation indicatorbased on the monitored relation between the at least two of theentities.
 15. The apparatus of claim 10, further comprising: ameasurement module configured to provide at least some of themeasurement data to the measurement tensor module.
 16. The apparatus ofclaim 10, further comprising: at least one database; and a readoutmodule configured to read out at least some of the measurement data fromthe at least one database.
 17. The method of claim 10, wherein theresult tensor calculation module is configured to use an alternatingleast-squares method, wherein the transformation tensor, therelationship tensor, and the weighting tensor are updated alternatinglyuntil convergence.
 18. A system for calculating a relation indicator fora relation between entities, comprising: a number, N, of entities; ameasurement tensor module configured to provide a measurement tensor Xof measurement tensor components, X_(ijk), with i, j=1 . . . N,comprising measurement data as relation indicators, wherein the relationindicator X_(ijk) indicates a k-th relation between an i-th and a j-thof the number of entities; a rules tensor module configured to provide arules tensor M of rules tensor components, M_(ijn), describing aprediction of an n-th rule; a weighting tensor module configured tocalculate a weighting tensor W of weighting tensor components, W_(nk),indicating relative weights of the rules for the k-th relation betweenthe entities; a relationship tensor module configured to calculate arelationship tensor R of relationship tensor components, R_(abk), witha, b=1 . . . r, indicating relations between a set of a number, r, ofproperties of the entities; a transformation tensor module configured tocalculate a transformation tensor A of transformation tensor components,A_(ia), describing the i-th entity via r latent properties, wherein thetransformation tensor A, the weighting tensor W, and the relationshiptensor R are calculated as minimum solutions to the following equation:${{\min\limits_{A,R,W}{{X_{ijk} - X_{ijk}^{\prime}}}_{F}^{2}} + {\lambda_{A}{A}_{F}^{2}} + {\lambda_{R}{R}_{F}^{2}} + {\lambda_{W}{W}_{F}^{2}}},$with λ_(A), λ_(R), and λ_(W) as Lagrange parameters and with resulttensor components X_(ijk) ^(′) of a result tensor X′ given by:X _(ijk) ^(′)=Σ_(a,b,n)(A _(ia) R _(abk) A _(bj) ^(T) +M _(ijn) W_(nk)), where A^(T) is the transposed tensor corresponding to thetransformation tensor A; a result tensor calculation module configuredto calculate a result tensor X′ of result tensor components, X_(ijk)^(′), and a relation indicator calculation module configured tocalculate a value of the relation indicator for the k-th relationbetween the i-th and the j-th entity based on the result tensorcomponent X_(ijk) ^(′).
 19. The system of claim 18, wherein at least oneof the entities is a sensor, an actuator, a field device, a controller,a display, or a section of a conveyer belt assembly.
 20. The system ofclaim 18, further comprising: a control signal generation moduleconfigured to generate at least one control signal, based on thepredicted value of the relation indicator, for controlling at least oneof the entities of the system.